//
//  FastResult.m
//  CarFace
//
//  Created by dlios on 15/4/1.
//  Copyright (c) 2015年 蓝鸥科技. All rights reserved.
//

#import "FastResult.h"
#import "NewsData.h"
#import "Articlemodel.h"
#import "Messagelist.h"

#import "Attachments.h"
#import "Commentlist.h"
@implementation FastResult
- (void)dealloc
{
    [_articleModel release];
    [_newsData release];
    [_rowcount release];
    [_newsdata release];
    [_articlemodel release];
//    [_messagelist release];
    [super dealloc];
}

- (instancetype)initWithDictionary:(NSDictionary *)dic
{
     _messagelist = [NSMutableArray array];
    self = [super initWithDictionary:dic];
    if (self) {
       
    }
    return self;
}

- (void)setValue:(id)value forKey:(NSString *)key
{
//    [super setValue:value forKeyPath:key];
    if ([key isEqualToString:@"newsdata"]) {
        _newsData = [[NewsData alloc] initWithDictionary:value];
    }
    if ([key isEqualToString:@"articlemodel"]) {
        _articleModel = [[Articlemodel alloc] initWithDictionary:value];
    }
    if ([key isEqualToString:@"messagelist"]) {

        for (NSDictionary *dic in value) {
            Messagelist *message = [[Messagelist alloc] initWithDictionary:dic];
            [_messagelist addObject:message];
            
        }
    }
}
@end